WT_DECLARE_WT_MEMBER(1,JavaScriptConstructor,"WDialog",function(g,b,h,i){function m(a){var c=a||window.event;a=d.pageCoordinates(c);c=d.windowCoordinates(c);var e=d.windowSize();if(c.x>0&&c.x<e.x&&c.y>0&&c.y<e.y){h=i=false;b.style.left=d.px(b,"left")+a.x-j+"px";b.style.top=d.px(b,"top")+a.y-k+"px";b.style.right="";b.style.bottom="";j=a.x;k=a.y}}function l(a,c,e){e-=2;c-=2;a.style.height=Math.max(0,e)+"px";if(c>0)a.style.width=Math.max(0,c)+"px";debugger;c=$(a).children(".body").get(0);if(a=$(a).children(".titlebar").get(0))e-=
a.offsetHeight+8;if(e>0){c.style.height=e+"px";g.layouts&&g.layouts.adjust()}}jQuery.data(b,"obj",this);var f=$(b).find(".titlebar").first().get(0),d=g.WT,j,k;if(f){f.onmousedown=function(a){a=a||window.event;d.capture(f);a=d.pageCoordinates(a);j=a.x;k=a.y;f.onmousemove=m};f.onmouseup=function(){f.onmousemove=null;d.capture(null)}}this.centerDialog=function(){if(b.parentNode==null)b=f=null;else if(b.style.display!="none"&&b.style.visibility!="hidden"){var a=d.windowSize(),c=b.offsetWidth,e=b.offsetHeight;
if(h){b.style.left=Math.round((a.x-c)/2+(d.isIE6?document.documentElement.scrollLeft:0))+"px";b.style.marginLeft="0px"}if(i){b.style.top=Math.round((a.y-e)/2+(d.isIE6?document.documentElement.scrollTop:0))+"px";b.style.marginTop="0px"}b.style.height!=""&&l(b,-1,e);b.style.visibility="visible"}};this.onresize=function(a,c){h=i=false;l(b,a,c)};b.wtResize=l;b.wtPosition=this.centerDialog});
